var PROTOCOL_TYPE = "http-only";

if(navigator.userAgent.toLowerCase().indexOf("chrome") != -1)
{
    $.browser.chrome = true;    
}
if($.browser.chrome)
{
    delete $.browser.safari;
}
//correction to JQuery $.browser

var alang = window.navigator.userLanguage || window.navigator.language;

if( alang.indexOf("da") != -1)
{
    alang = "da";
    
}




var PlayerJSPath = "<script src='js/Default/Player.js'></script>";
var ControlsJSPath = "<script src='js/Default/controls.js'></script>";
var LanguageJSPath = "<script src='js/lang/"+alang.toLowerCase() +".js'></script>";

if(PROTOCOL_TYPE != undefined || PROTOCOL_TYPE != "")
{
    var ProtocolJSPath = "<script src='js/Protocol/FileInterface-"+PROTOCOL_TYPE +".js'></script>";
    
}
else
{
    alert("you have to insert a ' var PROTOCOL_TYPE = ??? ' into your html code header");
}




for(var i in $.browser)
{
    if(i != "webkit" && i != "version")
    {
      switch(i)
      {
        case "chrome" : 
        break;
        
        case "safari" : 
            if(navigator.userAgent.toLowerCase().indexOf("mobile") != -1)
            {
                PlayerJSPath = "<script src='js/iOS/PlayerIOS.js'></script>";
                ControlsJSPath = "<script src='js/iOS/controlsIOS.js'></script>";
            }
            
        break;
        
        case "msie" : 
        break;
        
        case "mozilla" : 
        break;
        
        case "opera" : 
        break;
        
        default:break;
      
      
      
      }   
    }

}

document.write(LanguageJSPath);
document.write(PlayerJSPath);
document.write(ControlsJSPath);
document.write(ProtocolJSPath);


